list = []
for i in range(1, 30):
    list.append(i)
print(list)
print(list[0])
print(list[1])
pos = 0
for t in list:
    if t == 25:
        print(pos)
    pos = pos + 1

for i in range(len(list)):
    if list[i] == 25:
        print(i)
# 下面两句不一样的地方要注意
list2 = [3333, 3311]
list = list + list2
list.reverse()
print(list)


def listmax(list):
    maxx = -999999
    for e in list:
        if e > maxx:
            maxx = e
    return maxx


print(listmax(list))

a = 5
b = a
a = 0


class apple:
    # _weight = 5
    # _size=10
    def __init__(self, weight, size):
        self._weight = weight
        self._size = size

    def eat(self):
        print("apple can eat and weight is %d" % self._weight)

    def good(self):
        if self._size > 5 and self._weight > 5:
            return True
        else:
            return False


xiaohong = apple(15, 15)
if xiaohong.good():
    xiaohong.eat()
xiaohei = apple(1, 1)
if xiaohei.good():
    xiaohei.eat()
